{extend name="base"/}
{block name="css"}
<style>
    .layui-body {
        position: absolute;
        left: 0px;
        right: 0;
        top: 20px;
        bottom: 0;
        z-index: 998;
        width: auto;
        overflow: hidden;
        overflow-y: auto;
        box-sizing: border-box;
    }
</style>
{/block}
{block name="content"}
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-lg12">
            <fieldset class="layui-elem-field">
                <legend>商品分类管理 - 编辑分类</legend>
                <div class="layui-field-box">
                    <form class="layui-form" id="editform" enctype="multipart/form-data">
                        <div class="layui-form-item">
                            <label class="layui-form-label">分类名称</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input dataIntegral" name="cat_name" value="{$res.cat_name}"  lay-verify="required" placeholder="请输入">

                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">缩略图</label>
                            <div class="layui-input-block">
                                <div class="layui-input-inline">
                                    <button type="button" class="layui-btn layui-btn-normal" id="test1">上传图片</button>
                                    <p id="demoText"></p>
                                </div>
                                <div class="layui-input-inline">
                                    <img id="preview" width="80px" src="{$res.thumb}" >
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">是否显示</label>
                            <div class="layui-input-block">
                                <!-- <input type="text" class="layui-input dataIntegral" name="level" value=""  placeholder="请输入"> -->
                                <select name="is_show" >
                                    <option value="1"{if condition= "$res.is_show eq 1"} selected {/if}>显示</option>
                                    <option value="0"{if condition= "$res.is_show eq 0"} selected {/if}>不显示</option>

                                </select>

                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">排序值</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input dataIntegral" name="sort_order" value="{$res.sort_order}"   placeholder="请输入">

                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <input name="cat_id" type="hidden" value="{$res.cat_id}"/>
                                <button class="layui-btn" lay-submit="" lay-filter="editcat">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </fieldset>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script type="text/javascript" src="/static/backend/js/goodsCategory.js?t=3"></script>

{/block}
